package com.zhx.real.security.handler;

import org.springframework.security.core.AuthenticationException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author zhanghaixuan
 * @create 2018/4/18-上午11:05
 **/
public interface CuestomAuthentionFailedHandler {
	/**
	 * 用户登录失败后的自定义异常
	 * @param httpServletRequest 请求
	 * @param httpServletResponse 返回信息
	 * @param e 错误信息
	 * @throws IOException io错误
	 * @throws ServletException servlet错误
	 */
	void onAuthenticationFailure(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,
                                 AuthenticationException e) throws IOException, ServletException;
}
